package com.huixuebao.after.controller.settle;


import com.huixuebao.after.dto.SettleDTO;
import com.huixuebao.after.service.SettleService;
import com.huixuebao.common.bean.ApiResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Slf4j
@RestController
@RequestMapping("/hxb/after/settle")
public class SettleController {

    @Autowired
    private SettleService settleService;
    /**
     * 获取理赔审核列表信息
     * @return
     */
    @GetMapping("/getSettleToExamine")
    public ApiResult getSettleToExamine(Integer current,
                                        Integer size,
                                        String merchantsName,
                                        String courseName,
                                        String phone,
                                        Integer settleState){
        return settleService.getSettleToExamine(current,size,merchantsName,courseName,phone,settleState);
    }
    /**
     * 设置理赔额度
     */
    @PostMapping("/setSettleLimit")
    public ApiResult setSettleLimit(@RequestBody SettleDTO settleDTO){
        return settleService.setSettleLimit(settleDTO);
    }

    /**
     * 理赔驳回内容
     * @param settleDTO
     * @return
     */
    @PostMapping("/submitSettleReject")
    public ApiResult submitSettleReject(@RequestBody SettleDTO settleDTO){
        return settleService.submitSettleReject(settleDTO);
    }
}
